package com.imooc.ecommerce.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 *
 *
 * 通用相应对象定义
 * {
 *     "code":0,
 *     :message":"",
 *     "data":{}
 * }
 * @Author: zhangshao
 * @Date: 2023/3/23 10:22
 *
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResponse<T> implements Serializable {
    /**
     * 错误码
     */
    private Integer code;
    /**
     * 错误消息
     */
    private String message;
    /**
     * 泛型相应数据
     */
    private T Data;

    public CommonResponse(Integer code,String message){
        this.code =code;
        this.message = message;
    }
}
